package com.leoman.plz_p.module.api;


import com.leoman.plz_p.constants.Urls;
import com.leoman.plz_p.module.bean.BaseData;
import com.leoman.plz_p.module.bean.BaseDataWithList;
import com.leoman.plz_p.module.bean.BookListBean;
import com.leoman.plz_p.module.bean.CommentBean;
import com.leoman.plz_p.module.bean.CourseCommentBean;
import com.leoman.plz_p.module.bean.ExamRecordBean;
import com.leoman.plz_p.module.bean.IdsBean;
import com.leoman.plz_p.module.bean.MapData;
import com.leoman.plz_p.module.bean.MissionBean;
import com.leoman.plz_p.module.bean.MistakeSubjectBean;
import com.leoman.plz_p.module.bean.PageListData;
import com.leoman.plz_p.module.bean.PointDetail;
import com.leoman.plz_p.module.bean.RecentExamBean;
import com.leoman.plz_p.module.bean.StudyRecordBean;
import com.leoman.plz_p.module.bean.TestBean;
import com.leoman.plz_p.module.bean.TestExamBean;
import com.leoman.plz_p.module.bean.VideoListBean;

import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by guoh on 2018/7/15.
 */
public interface CourseApi {

    @POST(Urls.BOOK_LIST)
    Observable<BaseDataWithList<BookListBean>> getCourseList(@Query("token") String token, @Query("courseId") String courseId);

    @POST(Urls.RECENT_STUDY)
    Observable<BaseData<MapData>> getRecentStudy(@Query("token") String token, @Query("courseId") String courseId);

    @POST(Urls.MISTAKE_QUE)
    Observable<BaseData<MapData<MistakeSubjectBean>>> getMistakeSubject(@Query("token") String token);

    @POST(Urls.GET_POINT_INTRODUCE)
    Observable<BaseData<MapData>> getPointIntroduce(@Query("token") String token, @Query("courseChapterId") String courseChapterId, @Query("courseId") String courseId, @Query("type") String type);

    @POST(Urls.GET_POINT_DETAIL)
    Observable<BaseData<PointDetail>> getPointDetail(@Query("token") String token, @Query("courseChapterId") String courseChapterId, @Query("courseId") String courseId);

    @POST(Urls.GET_COURSE_COMMENT)
    Observable<BaseData<PageListData<CommentBean>>> getCourseComment(@Query("courseChapterId") String courseChapterId, @Query("page") int page, @Query("size") int size);

    @POST(Urls.GET_COURSE_COMMENT_BY_COURSE_ID)
    Observable<BaseData<PageListData<CourseCommentBean>>> getCourseCommentByCourseId(@Query("courseId") String courseChapterId, @Query("page") int page, @Query("size") int size);

    @POST(Urls.SEND_COURSE_COMMENT_BY_COURSE_ID)
    Observable<BaseData> sendCourseCommentByCourseId(@Query("token") String token, @Query("courseId") String courseChapterId, @Query("userId") String userId, @Query("content") String content);

    @POST(Urls.GET_POINT_DETAIL_BY_MISSION)
    Observable<BaseData<PointDetail>> getPointDetailByMissionClassId(@Query("token") String token, @Query("id") String id);

    @POST(Urls.GET_COURSE_COMMENT_BY_MISSION)
    Observable<BaseData<PageListData<CommentBean>>> getCourseCommentByMissionClassId(@Query("token") String token, @Query("id") String id, @Query("page") int page, @Query("size") int size);

    @POST(Urls.SEND_COURSE_COMMENT)
    Observable<BaseData> sendCourseComment(@Query("token") String token, @Query("courseChapterId") String courseChapterId, @Query("userId") String userId, @Query("content") String content);

    @POST(Urls.SEND_COURSE_COMMENT_BY_MISSION)
    Observable<BaseData> sendCourseCommentByMissionClassId(@Query("token") String token, @Query("id") String id, @Query("content") String content);

    @POST(Urls.STUDY_NUMBER)
    Observable<BaseData<MapData>>getStudyNumber();

    @POST(Urls.VIDEO_COMPLETE)
    Observable<BaseData<MapData>> videoComplete(@Query("token") String token, @Query("courseChapterId") String courseChapterId, @Query("examinId") String courseId);

    @POST(Urls.EXAM_RECORD)
    Observable<BaseData<MapData<ExamRecordBean>>> getExamRecord(@Query("token") String token);

    @POST(Urls.STUDY_RECORD)
    Observable<BaseDataWithList<StudyRecordBean>> getStudyRecord(@Query("token") String token, @Query("date") String date, @Query("page") String page, @Query("size") String size);

    @POST(Urls.MISSION_RECORD)
    Observable<BaseData<PageListData<MissionBean>>> getMissionRecord(@Query("token") String token, @Query("page") String page, @Query("size") String size);

    @POST(Urls.GET_EXAM_INFO)
    Observable<BaseData<MapData>> getExamInfo(@Query("token") String token, @Query("courseChapterId") String courseChapterId, @Query("courseId") String courseId);

    @POST(Urls.GET_EXAM_LIST)
    Observable<BaseData<PageListData<TestExamBean>>> getExamList(@Query("token") String token, @Query("name") String name, @Query("page") String page, @Query("size") String size);

    @POST(Urls.GET_RECENT_EXAM_INFO)
    Observable<BaseData<MapData<RecentExamBean>>> getRecentExamInfo(@Query("token") String token);

    @POST(Urls.MISSION_BOOK)
    Observable<BaseData<MapData>> getMissionBook(@Query("token") String token, @Query("id") String id);

    @POST(Urls.ALL_MISTAKE)
    Observable<BaseData<IdsBean>> getAllMistake(@Query("token") String token);

    @POST(Urls.GET_VIDEO_LIST)
    Observable<BaseData<MapData<VideoListBean>>> getVideoList(@Query("courseChapterId") String courseChapterId);

    @POST(Urls.GET_COURSE_SIMULATION)
    Observable<BaseData<TestBean>> getTestList(@Query("courseId") String courseId);

}
